TOP_BUILDDIR = @OMBUILDDIR@
HOST_SHORT = @host_short@

OPENMODELICA_INC=$(TOP_BUILDDIR)/include/omc/c/
PARMODELICAEXPOCL_INC=$(OPENMODELICA_INC)/ParModelica/explicit/openclrt/
OPENMODELICA_BUILTIN_DIR=$(TOP_BUILDDIR)/lib/omc
OPENMODELICA_LIB=$(TOP_BUILDDIR)/lib/$(HOST_SHORT)/omc
OPENMODELICA_BIN=$(TOP_BUILDDIR)/bin/

CC=@CC@
CXX=@CXX@

CFLAGS=@CFLAGS@
CPPFLAGS=@CPPFLAGS@ -I. -I"../../../c" -I$(OPENMODELICA_INC) -fPIC

EXEEXT=
DLLEXT=.so
OPENLC_LIB= -lOpenCL

all: transfer

transfer: libParModelicaExpl.a
	mkdir -p $(PARMODELICAEXPOCL_INC)
	$(COPY) omc_ocl_interface.h $(PARMODELICAEXPOCL_INC)
	$(COPY) omc_ocl_common_header.h $(PARMODELICAEXPOCL_INC)
	$(COPY) omc_ocl_memory_ops.h $(PARMODELICAEXPOCL_INC)
	$(COPY) libParModelicaExpl.a $(OPENMODELICA_LIB)
	$(COPY) ParModelicaBuiltin.mo $(OPENMODELICA_BUILTIN_DIR)
	$(COPY) OCLRuntimeUtil.cl $(PARMODELICAEXPOCL_INC)

Makefile: Makefile.in
	(cd ../../../../ && ./config.status)

include Makefile.common
